package com.foreknow.elmboot.controller;


import com.foreknow.elmboot.po.Food;
import com.foreknow.elmboot.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/FoodController")
public class FoodController {
    @Autowired
    private FoodService foodService;

    /**
     * 根据businessId查询商家所属食品的信息
     * @param businessId
     * @return
     */
    @RequestMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(String businessId) {
        return foodService.listFoodByBusinessIdService(businessId);
    }
}
